function(get_glibc_version )
    execute_process(
        COMMAND getconf GNU_LIBC_VERSION
        OUTPUT_VARIABLE GLIBC_VERSION_STR
        OUTPUT_STRIP_TRAILING_WHITESPACE
    )
    message(STATUS "glibc version: ${GLIBC_VERSION_STR}")
    # 解析成数字
    string(REGEX REPLACE ".* ([0-9]+)\\.([0-9]+).*" "\\1" GLIBC_VERSION_MAJOR "${GLIBC_VERSION_STR}")
    string(REGEX REPLACE ".* ([0-9]+)\\.([0-9]+).*" "\\2" GLIBC_VERSION_MINOR "${GLIBC_VERSION_STR}")
    math(EXPR GLIBC_VERSION_COMBINED "(${GLIBC_VERSION_MAJOR} * 100 + ${GLIBC_VERSION_MINOR})")
    # set(REQUIRED_GLIBC_VERSION 300) # 表示 2.28
    # 版本比较
    # if(GLIBC_VERSION_COMBINED LESS REQUIRED_GLIBC_VERSION)
    #     message(WARNING "glibc version is too old: ${GLIBC_VERSION_MAJOR}.${GLIBC_VERSION_MINOR} < 2.28")
    #     # 你可以在这里设变量或者报错
    #     # message(FATAL_ERROR "glibc >= 2.28 required")
    # else()
    #     message(STATUS "glibc version is OK: ${GLIBC_VERSION_MAJOR}.${GLIBC_VERSION_MINOR}")
    # endif()
    set(CURRENT_GLIBC_VERSION ${GLIBC_VERSION_COMBINED} PARENT_SCOPE)
endfunction()
